package com.codechuan.hallo_internal.thread;


import com.codechuan.hallo_internal.common.Constant;
import com.codechuan.hallo_internal.entity.CityInfo;

import okhttp3.OkHttpClient;

/**
 * @Deprecated 核心线程
 */
public class MainThread implements Runnable {
    private static final OkHttpClient client = new OkHttpClient();

    private CityInfo cityInfo;

    public MainThread(CityInfo cityInfo) {
        this.cityInfo = cityInfo;
    }

    @Override
    public void run() {
        SynContainer synContainer = new SynContainer();
        // 接单线程
        Constant.executorService.execute(new RobOrderThread(synContainer));
        // 获取订单线程
        Constant.executorService.execute(new ObtainOrderThread(synContainer,cityInfo));
        // 检测是否接单线程
        Constant.executorService.execute(new CheckJDThread());
    }
}